﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="DocumentManagement.Views.AuditBaoGao" %>

<%@ Import Namespace="DocumentManagement.Views" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        报告审批</h2>
    <div>
        <table>
            <tr>
                <td>
                    文件编号
                </td>
                <td>
                    委托来源
                </td>
                <td>
                    委托方
                </td>
                <td>
                    项目座落
                </td>
                <td>
                    附件报告
                </td>
                <td>
                    备注
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <%
                int i = 0;
            foreach (var bg in this.Model.BGs)
            {
                i++;%>
            <tr>
                <%using (this.Html.BeginForm("Audit", "baogao", FormMethod.Post))
                  {%>
                <td>
                    <a target="_blank" href="<%=this.Url.Action("ShowBaoGaoDetail", "baogao", new {id = bg.id}) %>">
                        <%=bg.wjbh%></a>
                    <input type="hidden" name="id" value="<%=bg.id%>" />
                    <input type="hidden" id="<%="hv_" + i %>" name="isSuccess" value="true" />
                </td>
                <td>
                    <%=bg.wtly%>
                </td>
                <td>
                    <%=bg.wtf%>
                </td>
                <td>
                    <%=bg.xmzl%>
                </td>
                <td>
                <%if (bg.hasAttachment)
                  { %>
                <a href="<%=this.Url.Action("DownloadBaoGaoAttachment", "BaoGao", new {id= bg.id})%>">附件</a>
                <%} %>
                </td>
                <td>
                    <textarea name="comment" cols="64" rows="5"></textarea>
                </td>
                <td>
                    <button type="submit" value="true" name="isSuccess" onclick="javascript:document.getElementById('<%="hv_" + i %>').value = 'true'; return true;">
                        审批通过</button>
                </td>
                <td>
                    <button type="submit" value="true" name="isSuccess" onclick="javascript:document.getElementById('<%="hv_" + i %>').value = 'false'; return true;">
                        审批失败</button>
                </td>
                <%} %>
            </tr>
            <%} %>
        </table>
    </div>
</asp:Content>
